{% extends "base.html" %}
{% block title %}设置{% end %}

{% block right %}

{% end %}

{% block js %}
	
{% end %}

{% block content %}

	    <div class="box"> 
                <div class="cell"><span class="fade"><a href="{{ reverse_url('main') }}">{{ handler.settings.site_name }}</a> <span class="chevron">&nbsp;›&nbsp;</span> 设置</span></div> 
                <div class="inner"> 
                    <form action="{{ reverse_url('setting') }}" method="post"> 
                    
                    <table cellpadding="5" cellspacing="0" border="0" id="profile_t"> 
                        <tr> 
                            <td width="80" align="right"> 
                                用户名
                            </td> 
                            <td width="200" align="left"> 
                                {{ current_user['account'] }} (只读)
                            </td> 
                        </tr> 
                        <tr> 
                            <td width="80" align="right"> 
                                电子邮件
                            </td> 
                            <td width="200" align="left"> 
                                {{ current_user['email'] }} (只读)
                            </td>
                        </tr>
			<tr>
			    <td width="80" align="right"> 
                                头像
                            </td> 
                            <td width="200" align="left"> 
                                <img src="{{ modules.Avatar(me['email'], 100, 'jpg') }}" />
				<br/>
				(<span>感谢<a href="http://www.gravatar.com" target="blank">Gravatar</a></span>)
                            </td>
			</tr>
                        <tr> 
                            <td width="80" align="right"> 
                                个人网站
                            </td> 
                            <td width="200" align="left"> 
                                <input type="text" class="sl" name="website" value="{{ me.get('website', '') }}" /> 
                            </td> 
                        </tr> 
                        <tr>
                            <td width="80" align="right"> 
                                城市
                            </td> 
                            <td width="200" align="left"> 
                                <input type="text" class="sl" name="location" value="{{ me.get('location', '') }}" maxlength="40" /> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td width="80" align="right"> 
                                头衔
                            </td> 
                            <td width="200" align="left"> 
                                <input type="text" class="sl" name="title" value="{{ me.get('title', '') }}" /> 
                            </td> 
                        </tr> 
			<tr> 
                            <td width="80" align="right"> 
                                个人简介
                            </td> 
                            <td width="200" align="left"> 
                                <textarea class="ml" name="bio">{{ me.get('bio', '') }}</textarea> 
                            </td> 
                        </tr> 
			<tr> 
                            <td width="80" align="right"> 
                            </td> 
                            <td width="200" align="left">
				{{ xsrf_form_html() }}
				<input type="hidden" name="do" value="profile"/>
                                <input type="submit" value="保存设置" class="super normal button" /> 
                            </td> 
                        </tr> 
                    </table> 
                    </form> 
                </div> 
            </div> 
            
            <div class="sep20"></div> 
            <div class="box"> 
                <div class="cell"> 
                    <span class="fade">安全</span> 
                </div> 
                <div class="inner"> 
                    <form action="{{ reverse_url('setting') }}" method="post"> 
                    
			<strong class="fade"></strong> 
			
			<div class="sep5"></div> 
			<table cellpadding="5" cellspacing="0" border="0"> 
			    <tr> 
				<td width="80" align="right"> 
				    当前密码
				</td> 
				<td width="200" align="left"> 
				    <input type="password" class="sl" name="password_current" value="" /> 
				</td> 
			    </tr> 
			    <tr> 
				<td width="80" align="right"> 
				    新密码
				</td> 
				<td width="200" align="left"> 
				    <input type="password" class="sl" name="password_new" value="" /> 
				</td> 
			    </tr> 
			    <tr> 
				<td width="80" align="right"> 
				</td> 
				<td width="200" align="left">
				    {{ xsrf_form_html() }}
				    <input type="hidden" name="do" value="password"/>
				    <input type="submit" value="更改密码" class="super normal button" /> 
				</td> 
			    </tr> 
			</table> 
                    </form> 
                </div> 
            </div> 

{% end %}